<template>
  <div class="indexpage">
    <!-- 调用公共头部组件 -->
    <AdminHeaderCom/>

    <!-- 主题 --> 
    <main>
      <!-- 左侧：公共侧导航组件 -->
      <AdminAsideCom/>

      <!-- 右侧：根据路由地址加载其他功能 -->
   
      <router-view/>
    </main>
  </div>
</template>

<script setup>
import AdminHeaderCom from '@/components/admin/public/AdminHeaderCom.vue';
import AdminAsideCom from '@/components/admin/public/AdminAsideCom.vue';

import {inject} from 'vue'

const AxiosData =()=>{
   let $axios = inject('$axios');
   let result = $axios.get('./data.json')

   
   if(result.status == 200){
     console.log(result.data);
   }
   
}

// 调用:因为setup本身就是替换beforeCreate和create周期的，所以直接调用函数相当于是在created周期之前调用函数
AxiosData();
</script>

<style spcoed>
.indexpage{
  width: 100%;
  height: 99vh;
  overflow: hidden;
}
.indexpage main{
  width: 100%;
  height: 88%;
  display: flex;
}


</style>